package com.punch.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.punch.common.dto.order.OrderCancelDTO;
import com.punch.order.model.Order;
import com.punch.order.model.RefundOrder;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wjj
 * @since 2020-11-23
 */
public interface RefundService extends IService<RefundOrder> {

    /**
     * 取消订单--进行退款
     *
     * @param orderEX        主订单信息
     * @param orderCancelDTO 退款实体
     */
    void refundOrder(Order orderEX, OrderCancelDTO orderCancelDTO);

    /**
     * 退款
     *
     * @param orderId 订单id
     * @param type    0-不同意 1-同意
     * @return long
     */
    Long refund(Long orderId, Integer type);
}
